still gettin 422 unprocessable entry but have cleaned up code structure a lot and also added login template, route, router and controller with logic pointing towards /api/login for now since I do not know yet where to send login request