Angular.js Authentication Prototype