Changed setLoginCookie to logUserIn