max_loans constant and check added to user model