identify user or redirect to login page