Implementing authentication for API to enable user login from mobile app