Add log-out functionality and fixed currentUserStaysLoggedInTillLoggedOut feature