in reply to CGI Login script error

  1. use strict and warnings
  2. you're running under taint but not untainting params
  3. use CGI::Carp 'fatalsToBrowser';
  4. please indent - it's unreadable!
  5. 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.