refactor ruby application controller

remove duplicated code for authorization since this is already done in
the application controller