working login with password and non-password.