Fix for locking sections and improved UX when trying to access plans

Section locks are now deleted on unlock rather than being modified. All
a user’s locks are deleted on logging out. Trying to access a plan when
logged out results in redirect to login page, trying to access one to
which you don’t have access when logged in redirects to “My Plans” with
an appropriate notice.