# Ionic PRO login not working

**URL:** <https://forum.ionicframework.com/t/ionic-pro-login-not-working/123386>\
**Category:** Appflow\
**Created:** [March 4, 2018, 5:07pm UTC](https://forum.ionicframework.com/t/ionic-pro-login-not-working/123386 "2018-03-04T17:07:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marija06](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@marija06](https://forum.ionicframework.com/u/marija06)\
**Post date:** [March 4, 2018, 5:07pm UTC](https://forum.ionicframework.com/t/ionic-pro-login-not-working/123386/1 "2018-03-04T17:07:20Z")

</div>

Hello, I am making an app using Wordpress and Ionic.

I setup a login which works fine on browser but when I try to test the app in Ionic PRO, my login doesn’t work. It doesn’t alert any error, only shows loading screen and nothing happens after that.

I also tried viewing the app in xcode and on login I receive a 501 not implemented server error.

I tried contacting server support to see if the problem is CORS related but they haven’t been able to resolve my issue.

Here is the coded from the provider:

```auto
  postLogin(username, password){
    let data = {
      username: username,
      password: password
    };

    let headers = new HttpHeaders();
    headers.set('Content-Type', 'application/json');
    return this.http.post(this.api_url, data, {headers: headers});

  }

```

And in the Login page I call the function like this:

```auto
  onLogin() {
      this.presentLoading();
      this.authProvider.postLogin(this.username, this.password).subscribe(data => {
      this.navCtrl.setRoot('MenuPage');
      localStorage.setItem('wpToken', JSON.stringify(data));
      this.loader.dismiss();
    }, error =>{ alert(JSON.stringify(error))});

  }

```

I followed this tutorial for my login - [https://www.youtube.com/watch?v=kiXs7hrmmmg&t=](https://www.youtube.com/watch?v=kiXs7hrmmmg&t=)

I tried several different approaches but none of them made any difference.

Hope someone here as any idea what my problem is related to.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:48pm UTC](https://forum.ionicframework.com/t/ionic-pro-login-not-working/123386/2 "2021-07-19T21:48:16Z")

</div>

Closed on July 19, 2021, 9:48pm UTC


