Refactored login window, sign in now validates and stores credentials