fix bug for login