imap: factor out gmail username too

Read username, password from gmail.credentials.