fixed login and registration