reworking registration and login functionality.  [steve]