After registration set the user as logged in and redirect to the main
page