adding database management for creds, including encoding user info in database