resolve #5 code checks if user logged in or not.