Added redirect if not logged in, and user recgonition