Best Practice · Last modified July 15, 2009
Providing a continuous sign-in experience is important for user participation to avoid undue barriers for the user when contributing content online. Remind the user of the need to sign-in, deliver them to the sign-in flow and return them to the context they were in when they were about to participate. Preserve any data that has been entered prior to the login procedure.
A user with an account but who is not currently signed in wants to participate by contributing something.
Use this pattern when authentication is required for participation in a community. Forms of participation include (but are not limited to) comments, votes, ratings, tags, posts to blogs or forums, and so on.
It's important that the sign-in requirement does not present an undue barrier to participation for the user.
Should paranoid concerns (such as cross-site scripting issues, and possible cross-domain issues) require that the flow be interrupted or even that the user be returned to a home page, then at least insert an alert message with a clear call to action to resume the moment of participation.
This message might include a link to the last known location, a pre-populated form or a message indicating a redirect in x seconds.
Kayak asks the user to sign-in with an in-page overlay, without leaving the current context.