# Admin user can't login

**URL:** <https://drone.discourse.group/t/admin-user-cant-login/8142>\
**Category:** Drone Support\
**Created:** [September 28, 2017, 7:50am UTC](https://drone.discourse.group/t/admin-user-cant-login/8142 "2017-09-28T07:50:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanux](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/fanux/32/4159_2.png) [@fanux](https://drone.discourse.group/u/fanux)\
**Post date:** [September 28, 2017, 7:50am UTC](https://drone.discourse.group/t/admin-user-cant-login/8142/1 "2017-09-28T07:50:48Z")

</div>

I config the admin user:

```auto
    environment:
      - DRONE_ADMIN=fanux,fanux

```

but can’t login.

log:

time=“2017-09-28T07:45:30Z” level=error msg=“cannot authenticate user. unexpected end of JSON input”

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [September 28, 2017, 2:31pm UTC](https://drone.discourse.group/t/admin-user-cant-login/8142/2 "2017-09-28T14:31:01Z")

</div>

> [@fanux](#):
>
> unexpected end of JSON input

This error tells me the API requests to your remote system (e.g. github) is not functioning properly. This error message specifically tells me the response is malformed.

---

<div class="post-metadata">

**Author:** ![fanux](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/fanux/32/4159_2.png) [@fanux](https://drone.discourse.group/u/fanux)\
**Post date:** [September 29, 2017, 12:46am UTC](https://drone.discourse.group/t/admin-user-cant-login/8142/3 "2017-09-29T00:46:53Z")

</div>

I regist the user in gogs, and fixed it。 administrator can’t see all the repos, so if I wan’t to trust a repo, I must add administrator to the repo collaborator？

---

<div class="post-metadata">

**Author:** ![omerxx](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/omerxx/32/3956_2.png) [@omerxx](https://drone.discourse.group/u/omerxx)\
**Post date:** [September 29, 2017, 9:35pm UTC](https://drone.discourse.group/t/admin-user-cant-login/8142/4 "2017-09-29T21:35:08Z")

</div>

Had a slightly different issue when adding myself as administrator after I already signed in as a normal user.  
I manually deleted my self from the PG-DB and then logged in after I’m admin in the config.  
All problems were gone.
