added is_admin? function.Added better redirect
added is_admin? method