added base path option to $state.url