Added handling for passwords longer than 16 charactars.
Added close button and fixed button conditioning