fix errors migrating to rails 4
Fixed facebook and twitter authentication