modified to redirect to /login if hitting /group when not logged in