I dont know if I understood you correctly, you have the logging in done, if the user enters good username and pass the datagrid is populated. But if the combination is wrong you have an empty datagrid. Could you show the code you use to get the user authenticated?
As for two people creating same username, you could set the username colum of the database as a primary key, so two same usernames will not be allowed.