you're running under taint but not untainting params
use CGI::Carp 'fatalsToBrowser';
please indent - it's unreadable!
don't store passwords unencrypted. Use Digest::MD5 or similar to store
Try to fix that lot, then see what happens. If you still have problems, copy and paste here the error from your apache error log and we can take another look.