Adding cookie instead of session for login