store credentials in localStorage