mapping database schema to classes

begun mapping database objects to classes
fixed indentation
fixed redirection on login
started moving towards dependency injection

instead of global variables