rails4 upgrade, authorization
merge rails4 branch to master