added cookies and user login