Improve the login and register workflow