Added isLoggedIn
Refactor
More detailed docs