This code is an example to create secured routes in AngularJS