Bugfix IPWhitelistedController checks the last IP in X_FORWARDED_FOR header
Refactors IPWhitelistedController