some adjustments to application controller and devise user model