update of login and register function

update of login and register function