I'm having the following error when trying to login:

It's because "user" is a reserved keyword, and should be quoted when executing the query, or it returns the currently connected user.
dabba=# select * from user;
user
----------
postgres
(1 row)
dabba=# select * from "user";
id | owned_zone_id | zone_id | email | password | firstname | lastname | dob | is_verified | roles | wallet | fidelity | created_at
----+---------------+---------+-------+----------+-----------+----------+-----+-------------+-------+--------+----------+------------
(0 rows)
Which database engine are you actually using in production? MariaDB?