encoding bug

login crashes always if no encoding chosen