diff --git a/src/lib/Hydra/Controller/User.pm b/src/lib/Hydra/Controller/User.pm
index bcfe0685..6a11c231 100644
--- a/src/lib/Hydra/Controller/User.pm
+++ b/src/lib/Hydra/Controller/User.pm
@@ -58,18 +58,9 @@ sub logout :Local :Args(0) :ActionClass('REST::ForBrowsers') { }
sub logout_POST {
my ($self, $c) = @_;
+ $c->flash->{flashMsg} = "You are no longer signed in." if $c->user_exists();
$c->logout;
- if ($c->request->looks_like_browser) {
- $c->response->redirect($c->request->referer || $c->uri_for('/'));
- } else {
- $self->status_no_content($c);
- }
-}
-
-sub logout_GET {
- # Probably a better way to do this
- my ($self, $c) = @_;
- logout_POST($self, $c);
+ $self->status_no_content($c);
}
@@ -107,16 +98,7 @@ sub persona_login :Path('/persona-login') Args(0) {
$c->set_authenticated($user);
$c->stash->{json}->{result} = "ok";
- $c->flash->{successMsg} = "You are now signed in as " . encode_entities($email) . "";
-}
-
-
-sub persona_logout :Path('/persona-logout') Args(0) {
- my ($self, $c) = @_;
- $c->stash->{json} = {};
- requirePost($c);
- $c->flash->{flashMsg} = "You are no longer signed in." if $c->user_exists();
- $c->logout;
+ $c->flash->{successMsg} = "You are now signed in as " . encode_entities($email) . ".";
}
diff --git a/src/root/layout.tt b/src/root/layout.tt
index 23327338..ed255e05 100644
--- a/src/root/layout.tt
+++ b/src/root/layout.tt
@@ -102,39 +102,49 @@
-
-
+ [% IF c.user_exists && c.user.password != '!' %]
+
+ [% ELSE %]
+
+
+
+ [% END %]
+