Added cookie for login session and setup login check process