This is a simple exemple for login in sinatra using warden, bcrypt and block user if have more than 5 failures attempts.
Default user was configured for email: [email protected] and password: 123
$ bundle
$ rackup
To add new user
$ bundle console
$ require './model'
$ User.create!(email: '[email protected]', password: 'test')
To unlock user
$ bundle console
$ require './model'
$ u = User.first(:email => '[email protected]').update(:blocked_user => false)