worked on some db independent issues

started some more work on login layer