Redirect user to index if they load /chat without having logged in previously
Fixed a type
Beautified the index page