added method to check if logged in