fixed a bug in the login system