Login when clicking the "done" button