Sign in/out & redirect to main if not logged in