Semi-working login from front-end