Switched to login by id to allow proper work of verifyCredentials in models
Changed shortening function
Fix bug when a redirect is sent to a popup
Fixed wrong unequality (if defaultValue is 0 don't work.

Added check to avoid null values if field is mandatory (aka NOT NULL on db).
Missing attributes support in templates (from AbstractView)
Merge pull request #388 from AppsFuel/master

Switched to login by id to allow proper work of verifyCredentials in models