changing the name of the login controller function to authenticate