some changes for login and register