#33 Fixed null pointer exception when user is not logged in
#33 Fixed condition