Added chpass function to connection.java