Add sign in and logged in logic in application view.