added login/logout functional