Main template cleanup and tab logic.

Cleaned up the main template and main.js code in client.
Added some starter tab logic for logging-in and out (use the get_lang function for strings!)