modified script structure
updated login UX