Fixed bug where newly registered user was not shown as logged in on first page load