feedback from gary: configure with params instead of block
feedback from gary: introduce custom credentials exception
security up to sha512
code climate