Added better method for the login form