fixed bug where, after registration, user is not logged in, but sent to home page