Replaced hardcoded identification of password position with dynamic code

To ensure connection with every username's length.