updated route to handle get request for login