User authentication with devise, based on RailsCasts 209 and 210.