Update authentication_script to devise's current behaviour