Extracted global and local constants. More

Edited styling, final refactoring before I start the administration
part.
User (in BaseController) is now saved and taken from the session instead
of constantly getting it from the database.