Description
Trying to login with registered users after user John is deleted results in Null pointer exception.
Steps to reproduce:
1. Navigate to the main page http://domain:port/aerogear-controller-demo/
2. Click the Register link
3. Fill the form with username test and password test and submit it
4. Click the 'Logout' link
5. Click the 'Login page' link
6. Login as user john / 123
7. Click the 'restricted admin page' link
8. Click the 'john' link
9. Click the delete button to delete user john
10. Logout using the URL http://domain:port/aerogear-controller-demo/logout
11. Click the 'Login page' link
12. login using the credentials of the previously created user (test/test)
13. The result is java.lang.NullPointerException
However if you register a new user after deleting john then the login procedure for these users work properly.
Expected behaviour:
When deleting a user the login procedure should work for the other registered users.
I attach my server logs which depict the Exception.