Large commit. Auth, api, handlers, and more.

All database functionality is separated into the api sub-package.
Some basic user api functions are working and being used by the login and new account routes.
AuthPass function altered to work with api and handler changes.