Redirect to public page after login

Fix for #1439