Fix a bug where unit tests are attempting to log in and use their session key in the same second that the session key was created.
Moved all the of the sql out of the init file and into it's own directory.