login/logout now fully work