Infinite redirects with drupal_goto
Where is MODULE_membercheck() getting called from? It would seem that it's getting called on user/login page requests which makes these pages redirect to themselves, hence the infinite loop.

You can either modify the calling of the function to ensure it doesn't get called on the login page or add a check in your function to make sure the current path is NOT user/login before doing the redirect, something like this:

function MODULE_membercheck(){
  global $user;
  if (!$user-&gt;uid &amp;&amp; current_path() != '/user/login') {
    drupal_goto('user/login', array('query' =&gt; array('destination' =&gt; 'member/check')));
  }
  // other stuff.
}