{% if ! User::is_valid () %}
<h3>{"Members"}</h3>
{! user/login !}
	{% if ! empty ($data->login_methods) %}
	<div class="social-login">
		{"Sign in with"}:<br />
	{% if in_array ('google', $data->login_methods) %}
		<a href="/user/login/google?redirect={{ $_SERVER.REQUEST_URI }}"><img src="/apps/user/pix/google.png" alt="Google" /></a>
	{% end %}
	{% if in_array ('facebook', $data->login_methods) %}
		<a href="/user/login/facebook?redirect={{ $_SERVER.REQUEST_URI }}"><img src="/apps/user/pix/facebook.png" alt="Facebook" /></a>
	{% end %}
	{% if in_array ('twitter', $data->login_methods) %}
		<a href="/user/login/twitter?redirect={{ $_SERVER.REQUEST_URI }}"><img src="/apps/user/pix/twitter.png" alt="Twitter" /></a>
	{% end %}
	{% if in_array ('openid', $data->login_methods) %}
		<a href="/user/login/openid?redirect={{ $_SERVER.REQUEST_URI }}"><img src="/apps/user/pix/openid.png" alt="OpenID" /></a>
	{% end %}
	{% if in_array ('persona', $data->login_methods) %}
		<a href="/user/login/persona?redirect={{ $_SERVER.REQUEST_URI }}" id="persona-login"><img src="/apps/user/pix/persona.png" alt="Persona" /></a>
	{% end %}
	</div>
	{% end %}
{% else %}
<h3>{{ User::val ('name') }}</h3>
<p><a href="/user">{"View profile"}</a><br />
<a href="/user/logout?redirect=/"{% if in_array ('persona', $data->login_methods) %} id="persona-logout"{% end %}>{"Log out"}</a></p>
{% end %}
