Fixed possible error when login fails and PHP is set to report errors to screen