Add support for remember-me

Also fixed a couple coding standards issues as indicated by the
php-cs-fixer.
Address code review issues and add unit test.