Source code for a simple implementation of authentication using brcypt and has_secure_password. See gist for steps.