Logging!
Fixed condition to "loggedIn" not "! loggedIn".