made checkLogin() work when there are no cookies