Update bug fix for #26
Merge with #30. Add isLoggedIn method
Fix warnings (lost precision)