refactor
fix login/registration