Reworking login authentication and route handling structure.