created ajax response for finding whether there is a logged-in user