login/out functionality implemented