Implemented generateToken webapi action