Save credentials implementation

tested with and without checked before and after login.