Moved the authentication part to python since I can't find a way to prompt from casperjs