checks if user is already logged in