Fixed a crash when accessing the /login/ resource directly.