added capability to login and register