Implementing authentication on the application side