rest api admin and teacher implemented