Hi Robert,
The username attribute belongs to a system entity, {User}. Thus,
#1 you need to create an auxiliary entity that references {User} system entity and stores the "complete" username (128 chars).
#2 Yes, LoginPassword is a built-in action that receives a {User} entity identifier and a password to be checked in the database.
This scenario could work in your case:
i) use Encrypt() function to compress username attributes to 50chars in {User} system entity.
ii) use Encrypt() function to compare the login username with any existing in the {User} entity - this helps you identify the user in the login process.
iii) verify the password with Encrypt(password) over a simple query on {User} table
iv) use Login built-in action instead of LoginPassword, since you already authenticated the user in the steps above.
Hope that helped.
Cheers,
Pedro