Added logic to accept a redirect after login from apostrophe.js (which accepts it from app.js)