1- password accept Space at the end and allow user to login. When user login it gives the option to update password.
2- when you click logout button it redirect to the new page for the confirmation.
confirmation should be on the same page with the popup.