How to redirect the user using hook_init?
/**
 * Implements hook_init().
 */
function mymodule_init() {
  global $base_url;
  if (user_is_anonymous() &amp;&amp; arg(0) == 'user') {
    drupal_goto($base_url . 'mylogin');
  }
}