fixed some bug about the login in