Added javascript buffer loading to layout
Redirects on login and register when logged in
Added views for common errors