title: CakePHP share Login function for REST and Form authentication?
body: <p>So my <strong>CakePHP</strong> is a website which happens to have a mobile app. In the website, I'm using <strong>form-based authentication</strong>. Now I'm trying to do <strong>REST</strong> authentication. I decided that my <strong>REST</strong> calls are going to be <strong>Basic Authentication</strong>.</p>
  
  <p>Since all my <strong>REST</strong> calls are going to be authenticated, should I create a different login function such as <code>UsersController::api_login()</code> for <strong>REST</strong> or should I share the same <code>UsersController::login()</code> function I use to authenticate the website?</p>