Add proper handling of promise result.
Add ui-router and home state.