rewrote background-scripts, added saving credentials, fixed bug in settings