complete login and register