Reviewed client side authentication.
Use angluar-ui-router for client side routing.