Fix user not being logged in after registering. Closes #74