Cleaned up the authentication middleware and restricted group/* to authenticated users
Fixed login urls and template formatting