Improve login and register