Updated code for routes and login form action