Added cache control directives to controllers
Cleaned up login/logout JS functions