Check if submitted email address belongs to a user account How could I go about allowing a (not logged in) guest user to submit their email address, check behind the scenes if it belongs to a user account, and then return: 


A login form if it does
A registration form if it doesn't
I assume you have basic knowledge about plugins and routing, if not I'll update my post in a few hours.. otherwise Your form could be

&lt;!-- check if user submitted something --&gt;
{% if userExists is defined %}
    {% if userExists == true %}
        &lt;!-- user exists login --&gt;
        hello {{ user.name }}

        &lt;form method="post" accept-charset="UTF-8"&gt;
            {{ getCsrfInput() }}
            &lt;input type="hidden" name="action" value="users/login"&gt;

            &lt;h3&gt;&lt;label for="loginName"&gt;Username or email&lt;/label&gt;&lt;/h3&gt;
            &lt;input id="loginName" type="text" name="loginName"
                   value="{{ craft.session.rememberedUsername }}"&gt;

            &lt;h3&gt;&lt;label for="password"&gt;Password&lt;/label&gt;&lt;/h3&gt;
            &lt;input id="password" type="password" name="password"&gt;

            &lt;label&gt;
                &lt;input type="checkbox" name="rememberMe" value="1"&gt;
                Remember me
            &lt;/label&gt;

            &lt;input type="submit" value="Login"&gt;

            {% if errorMessage is defined %}
                &lt;p&gt;{{ errorMessage }}&lt;/p&gt;
            {% endif %}
        &lt;/form&gt;

        &lt;p&gt;&lt;a href="{{ url('forgotpassword') }}"&gt;Forget your password?&lt;/a&gt;&lt;/p&gt;

    {% else %}
        &lt;!-- user does not exist register --&gt;
        &lt;!-- snip see here for full content https://craftcms.com/docs/templating/user-registration-form --&gt;

    {% endif %}

{% else %}
    &lt;!-- parameter not set show search form --&gt;
    &lt;form method="post"&gt;
        &lt;input type="hidden" name="action" value="test/checkEmail"&gt;
        &lt;input type="text" name="email"&gt;
        &lt;input type="submit"&gt;
    &lt;/form&gt;
{% endif %}


And your controller 

public function actionCheckEmail(){
    $email = craft()-&gt;request-&gt;getParam('email');
    if($user = craft()-&gt;users-&gt;getUserByEmail($email)){
        // user registered
        $userExists = true;
    }else{
        $userExists = false;
    }
    craft()-&gt;urlManager-&gt;setRouteVariables([
        'userExists'    =&gt; $userExists,
        'user'          =&gt; $user
    ]);
}