Log in function works as well as the is logged in function.