login fully implemented on frontend

token is saved in local storage, $rootScope.isValidated is used to
determine whether routing is allowed
fixed routing, cleaned up code

fixed routing loop,
added some comments,
cleaned up code