A basic RESTful api and authentication in PHP for an online store