Removed useless functions.
Implemented javascript safety.
Merge branch 'ui' into Socket_Interfacing

Conflicts:
	public/javascript/main.js
External invites working.
Need to test multiple invites.
Need to fix logout error.
Commented most functions.
Fixed logout issue.
Merge branch 'ui' into Socket_Interfacing

Conflicts:
	public/javascript/main.js
Text.