Changed cookie creation, added user id validation

Cookies now contain an expiration date. Had to switch to an external JS
library due to AngularJS 1.2.6 limitations. Added in verification of
user id in routing.