How to use Superlogin and Superlogin-client in Ionic 3

Hello I am a newbie here, I am developing an app using ionic 3 after following Josh’s tutorial part-2-creating-a-multiple-user-app-with-ionic-2-pouchdb-couchdb on how to use superlogin with ionic 2 the app is working Ok but I am unable to keep the user logged in after page refresh the user is logged out. From my research I am supposed to use superlogin-client to use the methods of superlogin but I have failed to implement this.

here is my todo.ts

import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/add/operator/map';
//import * as PouchDB from 'pouchdb';
import PouchDB from 'pouchdb';

import superlogin from 'superlogin-client';

var config = {
  // The base URL for the SuperLogin routes with leading and trailing slashes (defaults to '/auth/')
  baseUrl: 'http://localhost:3000/auth/',
  // A list of API endpoints to automatically add the Authorization header to
  // By default the host the browser is pointed to will be added automatically
  endpoints: ["localhost:3000"],
  // Set this to true if you do not want the URL bar host automatically added to the list
  //noDefaultEndpoint: false,
  // Where to save your session token: localStorage ('local') or sessionStorage ('session'), default: 'local'
  storage: 'local',
  // The authentication providers that are supported by your SuperLogin host
  providers: ['facebook', 'twitter'],
  // Sets when to check if the session is expired. 'stateChange', 'startup' or nothing.
  // 'stateChange' checks every time $stateChangeStart or $routeChangeStart is fired
  // 'startup' checks just on app startup. If this is blank it will never check.
  checkExpired: false,
  // A float that determines the percentage of a session duration, after which SuperLogin will automatically refresh the
  // token. For example if a token was issued at 1pm and expires at 2pm, and the threshold is 0.5, the token will
  // automatically refresh after 1:30pm. When authenticated, the token expiration is automatically checked on every
  // request. You can do this manually by calling superlogin.checkRefresh(). Default: 0.5
  refreshThreshold: 0.5
export class Todos {
  data: any;
  db: any;
  remote: any;
  constructor(private http: Http) {

    this.db = new PouchDB('zpos');
    this.remote = details.userDBs.supertest;
    let options = {
      live: true,
      retry: true,
      continuous: true
    this.db.sync(this.remote, options);
  logout(){ = null;
    this.db.destroy().then(() => {
      console.log("database removed");
  getTodos() {

    if ( {
      return Promise.resolve(;
    return new Promise(resolve => {
        include_docs: true
      }).then((result) => {
 = [];
        let doc = => {
        this.db.changes({live: true, since: 'now', include_docs: true}).on('change', (change) => {
      }).catch((error) => {
    this.db.put(todo).catch((err) => {
    this.db.remove(todo).catch((err) => {
    let changedDoc = null;
    let changedIndex = null;, index) => {
      if(doc._id ==={
        changedDoc = doc;
        changedIndex = index;
    //A document was deleted
    if(change.deleted){, 1);
    else {
      //A document was updated
      if(changedDoc){[changedIndex] = change.doc;
      //A document was added
      else {; 

Any help I will really appreciate