<style type="text/css">
#login_as {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    line-height: 29px;
    color: #ccc;
    margin: 0;
    padding: 3px 15px;
    background: #222;
    border: 3px solid #000;
    border-width: 3px 0;
}
#login_as .self {
    float: left;
}
#login_as form {
    float: right;
}
#login_as * {
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-family: arial, helvetica, sans-serif;
}
#login_as form {
    display: block;
}
#login_as strong {
    color: #fff;
}
#login_as input[type=text],
#login_as input[type=submit],
#login_as a {
    border: 1px solid #555;
    color: #fff;
    padding: 0 5px;
    text-transform: lowercase;
    border-radius: 0;
}
#login_as input[type=text] {
    border-radius: 0;
    border: 0;
    margin: 0 3px;
    width: 120px;
    background: inherit;
    outline: 0;
    border-bottom: 1px solid #aaa;
    box-shadow: none;
}
#login_as input[type=submit],
#login_as a {
    font-size: 11px;
    padding: 0 8px;
    height: auto;
    line-height: 22px;
    display: inline-block;
    vertical-align: middle;
    text-transform: uppercase;
    text-align: center;
    border: 1px solid #444;
    border-radius: 3px;
    text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
    background: inherit;
    border: 0;
    color: #ccc;
    font-weight: bold;
}
#login_as input[type=submit]:hover,
#login_as a:hover {
    color: #fff;
}
#login_as input[type=submit] {
    line-height: 22px;
}
#login_as a {
    font-weight: bold;
}
</style>

<menu id="login_as">
    <div class="self">
        You are logged in as <strong>{{ request.user.username }}</strong> ({{ request.user.email }}) {% if request.actual_user.username != request.user.username %}<input type="submit" onclick="this.form['login_as'].value = ''" value="Logout"/>{% endif %}
    </div>
    <form method="POST">
        Switch user: <input type="text" name="login_as" value="{{ request.user.username }}"/> <input type="submit" value="Go"/>
    </form>
</menu>
