Refactored to better MVC

Added controllers for login and main views.
Thesaurus and tickets panels are now separated.