fix bug in app controller for devise