get request when page loads to see if the user is logged in