checks if user is logged in

File checks whether a user has logged in, checks the cookies of the
user.