changed structure for login routes and schema