Fixed #13

(Re)applied the login and redirection fix of user registration