Refactor maincore, removing the routing to avoid errors when a hash is included to the url

~put a logout at the sidebar
~remove unused files and codes
~fixed some small glitch on the layout