moved login from redis to postgres table