Change the usage of some schemas
Cleaned up login code to use schemas