devise and javascript fixes