added custom authentication implementation