Completed implementation, including the login's cancel button.