revise the login process for web context setting