error checking for logon