title: @auth.requires_membership not working
body: <p>Using web2py for my application I would like to include a login for registered users (the users are pre-registered by me through admin interface and are members of the group 'eap').
  In my controller I have</p>
  
  <pre><code>#login for EAP parties
  @auth.requires_membership('eap')
  def eap():
      return locals()
  
  def user():
      auth.settings.login_next = URL('eap')
      return dict(form=auth())
  </code></pre>
  
  <p>In my model I have</p>
  
  <pre><code>auth = Auth(db, host_names=myconf.get('host.names'), secure=True)
  ## create all tables needed by auth if not custom tables
  auth.define_tables(username=True, signature=False)
  </code></pre>
  
  <p>When I use
  'example.com/eap' I am referred to 
  'example.com/user/login?_next=/eap' and the request to input username and password.
  After providing those, I am ending up at 
  'example.com/user/login?_next=/eap#', whereas I obviously wanted to access 'example.com/eap'</p>
  
  <p>I am using the default 'layout.html' and 'user.html' provided by web2py.</p>
  
  <p>I have read the documentation on Authentication and have been through several blogs..., any pointers on what to look into would be much appreciated!</p>