oic. for some reason username is not in the session for aws login. hence the KeyError check.