adding functionality to the login form