implemented basic REST API for user