modify a little on login logic to fit coding style