mid-devise implementation with sign-in almost working