fixing overwrite of user attributes on login with tests
adding some tests to check local vs dbauth