implemented login, error popups, implementing localstorage etc