what did obama do before he became a president?