Fixing login endpoint for the api