Help creating own user - password dialog box

I want to handle access to screens and tables through my own security
system.  I use Delphi 4 with a Sybase SQLAnywhere database.  I have set
login prompt to false and supplied the userid and passsword in the
params property of the database component.  I have a splash screen that
displays while the app loads.  It has four bitmaps on it that won't
display now that I set login prompt to false.  When I had login prompt
set to true, all four bitmaps displayed and then the login dialog box
would display.  Why aren't the bitmaps loading now??  Also, I am tring
to use a standard dialog box to get the user's name and password now.  I
created one and tried to get it to display after the main screen opens.
I put this code on the 'on show' event of the main screen: If
PasswordDlg.showmodal = mrOK then
                               // check for user name and correct
                               // if valid continue with app
                               // else give second try and close app if
still not valid

The password dialog box displays, but before the main screen does, and
then main screen doesn't display until this dialog box is closed.  I
want the main screen to display, and then the password dialog box to
display on top of it.  How do I do this?  Thanks.